﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demos.DesignPatterns._23_访问者模式
{
    /// <summary>
    /// 礼品卡
    /// </summary>
    public class GiftCard : MyProduct
    {
        /// <summary>
        /// 礼品卡名称
        /// </summary>
        public string Name { get; }
        /// <summary>
        /// 礼品卡金额
        /// </summary>
        public decimal Amount { get; }
        public GiftCard(string name, decimal amount)
        {
            Name = name;
            Amount = amount;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="visitor"></param>
        /// <exception cref="NotImplementedException"></exception>
        public void Accept(IVisitor visitor)
        {
            visitor.Visit(this);
        }
    }
}
